package com.swp.oa.sys.service;

import java.util.List;

import com.swp.oa.sys.dto.domian.DepartmentDto;
import com.swp.oa.sys.dto.page.EasyuiTreeNode;
import com.swp.oa.sys.pojo.Department;

public interface IDepartmentService {

	public abstract boolean save(Department dep);

	public abstract boolean save(DepartmentDto dept);

	public abstract boolean deleteByPrimaryKey(String departmentId);

	public abstract boolean update(DepartmentDto dept);

	public abstract DepartmentDto getByDeptIdToModel(String departmentId);

	public abstract boolean deleteUserGroup(String userid, String groupid);

	/**
	 * 根据部门Id获取子部门集合
	 * 
	 * @param id
	 * @return
	 */
	public abstract List<DepartmentDto> getChildrenByDepartmentId(String id);

	/**
	 * 根据Id获取部门树节点集合
	 * 
	 * @param id
	 * @return
	 */
	public abstract List<EasyuiTreeNode> tree(String id);
	
	public abstract DepartmentDto getRootDepartmentModel();
	
	public abstract String getDeptIdByUserId(String userId);

}
